<div class="x-list-title">
<table width="100%" border="0" height="100%">
<tr><td align="left">
	<h2>Quản lý tin tức</h2>
</td><td align="right">	
<?php $id = getId();?>
<div class="x-list-options">	
	<a href="#News/Manage/Add" class="x-button">Đăng tin mới</a>
</div>

</td></tr></table>	
</div>
<?php $vars = $this->get('vars');?>
<?php
$vars = $this->get('vars');
$link = '#'.$this->getModule()."/".$this->getController()."/".$this->getAction();
?>
<form id="f<?php _e($id);?>">
<table width="100%" class="x-list" cellpadding="0" cellspacing="0">
<tr>
	<th align="center" width="25">
	TT
	</th>
	<th align="center">
		<?php show_order_link('Tiêu đề','title',$link,$vars) ;?>
	</th>
	<th align="center" width="120">
		<?php show_order_link('Chuyên mục','parent_id',$link,$vars) ;?>
	</th>
	<th align="center" width="80">
		<?php show_order_link('Hiển thị','date',$link,$vars) ;?>
	</th>
	<th align="center" width="100">
		<?php show_order_link('Người đăng','created_by_id',$link,$vars) ;?>
	</th>
	<th align="center" colspan="3">Tác vụ</th>
	<th align="center" width="25">
		<div class="x-check-container">
			<div class="x-check">
			<input type="checkbox" class="x-checkbox x-checkall"/>
			</div>
			<div class="x-check-options">
				<a class="x-check-item check-all">Chọn tất cả</a>
				<a class="x-check-item uncheck-all">Bỏ chọn tất cả</a>
			</div>
		</div>
	</th>
</tr>
<?php if( count($this->get("posts")) > 0 ): ?>
<?php foreach( $this->get("posts") as $k => $a ): ?>
<tr>
<td align="center">
	<?php _e($k+1);?>
</td>
<td>
	<a href="#News/Index/View?ID=<?php _e($a['ID']);?>">
		<?php _e(short_title($a['title'],$a['is_read']=='yes' ? 30 : 28));?></a>
</td>
<td align="center">
	<a href="#News/Manage?parent_id=<?php _e($a['ID']);?>">
		<?php _e($a['parent_title']);?></a>
</td>
<td align="center">
	<?php _e(show_date(DATE_FORMAT,$a['date']));?>
</td>
<td align="center">
	<?php _e(get_user_link($a['created_by_id'],$a['created_by_name'],$a['created_is_deleted']) ); ?>
</td>
<td align="center" width="25">
	<a onclick="ajax_load('<?php _baseUrl()?>/News/Manage/Verify?ID=<?php _e($a['ID'])?><?php _e($qr_cat)?>')" title="Duyệt/bỏ duyệt bài viết" class="<?php _e( $a['is_approve']=='no' ? 'x-noverify' :'x-verify') ?>"></a>
</td>
<td align="center" width="25">
	<a onclick="module_delete('<?php _baseUrl()?>/News/Manage/Delete?ID=<?php _e($a['ID'])?><?php _e($qr_cat)?>')" class="x-delete"></a>
</td>
<td align="center" width="25">
	<a href="#News/Manage/Edit?ID=<?php _e($a['ID'])?>" class="x-edit"></a>
</td>
<td align="center">
	<input name="ID[]" value="<?php _e($a['ID'])?>" type="checkbox" class="x-checkbox x-checkall"/>
</td>
</tr>
<?php endforeach;?>
<tr>
	<td colspan="9" class="page">
	<div class="x-page">
		<?php $this->e("page");?>
	</div>		
	</td>
</tr>
<?php else:?>
<tr>
	<td colspan="11" class="page"><div class="x-page">
			Không có tin nào được tìm thấy
		</div>
	</td>
</tr>
<?php endif;?>
</table></form>
